// components/search/module/sInput/sInput.js
const { debounce } = require("../../../../utils/util");
Component({
  /**
   * 组件的属性列表
   */
  options: {
    // virtualHost: true,
  },
  properties: {
    data: {
      type: Object,
      value: () => {
        return {};
      },
    },
    value: {
      type: null,
      value: '',
    }
  },
  observers: {
    value(v){
      this.setData({
        insideValue: v,
      })
    },
  },
  /**
   * 组件的初始数据
   */
  data: {
    insideValue: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getValue(e) {
      this.setData({
        insideValue: e.detail.value,
      })
      this.triggerEvent("value", {
        type: this.data.data.name,
        value: e.detail.value,
      });
    },
  },
});
